﻿#region 版权信息

// ------------------------------------------------------------------------------
// Copyright: (c) 2019  梅军章
// 项目名称：Amm.UnitOfWork
// 文件名称：IPagedList.cs
// 版本号: V1.0.0.0
// 创建时间：2019-07-31 10:42
// 更改时间：2019-07-31 11:26
// ------------------------------------------------------------------------------

#endregion

#region 项目引用

using System.Collections.Generic;

#endregion

namespace Amm.UnitOfWork.Collections
{
    /// <summary>
    ///     Provides the interface(s) for paged list of any type.
    /// </summary>
    /// <typeparam name="T">The type for paging.</typeparam>
    public interface IPagedList<T>
    {
        /// <summary>
        ///     Gets the index start value.
        /// </summary>
        /// <value>The index start value.</value>
        int IndexFrom { get; }

        /// <summary>
        ///     Gets the page index (current).
        /// </summary>
        int PageIndex { get; }

        /// <summary>
        ///     Gets the page size.
        /// </summary>
        int PageSize { get; }

        /// <summary>
        ///     Gets the total count of the list of type <typeparamref name="T" />
        /// </summary>
        int TotalCount { get; }

        /// <summary>
        ///     Gets the total pages.
        /// </summary>
        int TotalPages { get; }

        /// <summary>
        ///     Gets the current page items.
        /// </summary>
        IList<T> Items { get; }

        /// <summary>
        ///     Gets the has previous page.
        /// </summary>
        /// <value>The has previous page.</value>
        bool HasPreviousPage { get; }

        /// <summary>
        ///     Gets the has next page.
        /// </summary>
        /// <value>The has next page.</value>
        bool HasNextPage { get; }
    }
}